#ifndef VOLTAGEMETERITEM_H
#define VOLTAGEMETERITEM_H

#include "circuitcomponent.h"

class VoltageMeter : public CircuitComponent
{
    Q_OBJECT
public:
    explicit VoltageMeter(double value = 0.0, QGraphicsItem *parent = nullptr);

    QPointF inputPort() const override;
    QPointF outputPort() const override;
    void setValue(double value);
    void setText(const QString &text);

protected:
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;

private:
    double m_value;
    QString m_text="";
};

#endif // VOLTAGEMETERITEM_H
